<form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()">
    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="server">服务器</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="必填项">
        <input nz-input formControlName="server" id="server" />
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
        <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="port">端口号</nz-form-label>
        <nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="必填项">
            <input nz-input formControlName="port" id="port" />
        </nz-form-control>
    </nz-form-item>

    <nz-form-item>
        <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="userName">用户名</nz-form-label>
        <nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="必填项">
            <input nz-input formControlName="userName" id="userName" />
        </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="password" nzRequired>密码</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="必填项">
        <input nz-input type="password" id="password" formControlName="password"/>
      </nz-form-control>
    </nz-form-item>

   
    <nz-form-item nz-row>
        <nz-form-control [nzSpan]="6" [nzOffset]="6">
            <button nz-button nzType="primary">连接</button>
        </nz-form-control>

        <nz-form-control [nzSpan]="6" [nzOffset]="4">
            <button nz-button nzType="default">测试连接</button>
        </nz-form-control>
    </nz-form-item>

  </form>